
class PapriNadeCylinder extends ConsumableAmmo;

#exec MESH IMPORT MESH=PapricaAmmoM ANIVFILE=MODELS\PapricaAmmo_a.3d DATAFILE=MODELS\PapricaAmmo_d.3d x=0 y=0 z=0LODSTYLE=10
#exec MESH ORIGIN MESH=PapricaAmmoM X=400 Y=-300 Z=100 YAW=0
#exec MESH SEQUENCE MESH=PapricaAmmoM SEQ=All    STARTFRAME=0  NUMFRAMES=1
#exec TEXTURE IMPORT NAME=PapricaAmmoT FILE=Textures/PapriNadeUVmap.pcx GROUP="Skins"  LODSET=2
#exec MESHMAP SCALE MESHMAP=PapricaAmmoM X=0.0375 Y=0.0375 Z=0.075
#exec MESHMAP SETTEXTURE MESHMAP=PapricaAmmoM NUM=0 TEXTURE=PapricaAmmoT

function bool UseAmmo(int AmountNeeded)
{
	if (AmmoAmount < AmountNeeded)
	{
		return False;
	}
	if (remainingInCan == 0) 
	{
		if(AmountPerCan >= AmmoAmount) 
		{
			remainingInCan = AmmoAmount;
		} 
		else 
		{
			remainingInCan = AmountPerCan;
		}
	}
	remainingInCan -= AmountNeeded;
	AmmoAmount -= AmountNeeded;
	return True;
}

defaultproperties
{
   AmmoAmount=4
   AmountPerCan=1
   MaxAmmo=10
   UsedInWeaponSlot(5)=1
   PickupMessage="You picked up Papri nades."
   ItemName="Papri Nade Cylinder"
   DrawScale=1.30000
   PickupViewMesh=PapricaAmmoM
   MaxDesireability=0.220000
   Skin=PapricaAmmoT
   Mesh=PapricaAmmoM
   CollisionRadius=20.000000
   CollisionHeight=10.000000
   bCollideActors=True
   remainingInCan=2
}
